home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Tele
/
C
/
Comet2.1.3.cpt
/
emlib
/
blank.asm
< prev
next >
Wrap
Assembly Source File
|
1990-06-26
|
1KB
|
50 lines
; Copyright Cornell University 1986. All rights are reserved.
; kevin eric saunders
public _c19_blank
public _c19_blankmap
public _c19_blank
public _c19_blankmap
; a fast routine to blank a line
; entry 8(sp) -> position to start blanking
; 12(sp) -> count word
_c19_blank
move.l 4(sp),a0 ; a0 -> dest
move.w 8(sp),d0 ; d0 = count
move.l a0,a1
add.l #1920,a1 ; a1 -> attributes TODO should not use CONSTANT!
move.l #$20202020,d2 ; d2 = blanks
move.l #0,d3 ; d3 = null attr
move.w d0,d1 ; d1 = count
bra.s floop ; jump into the dbra loop
rpt1
move.b d2,(a0)+
move.b d3,(a1)+
floop
dbra d0,rpt1
rts
; blank the whole screen map, relatively quickly
_c19_blankmap
move.l 4(sp),a0 ; a0 -> dest
move.w #480,d0 ; d0 = # of longs in screen
move.l a0,a1
add.w #1920,a1 ; a1 -> attributes
move.l #$20202020,d2 ; d2 = blanks for charr array
move.l #0,d3 ; d3 = null attr for attribute array
do4
bra.s inloop
rpt4
move.l d2,(a0)+
move.l d3,(a1)+
inloop
dbra d0,rpt4
rts